/* 知识点画像仪表板样式 */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 科目卡片样式 */
.subject-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.subject-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.subject-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.subject-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.subject-stats {
    display: flex;
    gap: 1.5rem;
}

.subject-stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.stat-text {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 掌握度进度条 */
.mastery-progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
    margin: 1rem 0;
}

.mastery-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
}

.mastery-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.mastery-rate {
    font-weight: 600;
    font-size: 0.875rem;
}

.mastery-label {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
}

/* 知识点网格 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.knowledge-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.knowledge-card:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.knowledge-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.knowledge-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

.mastery-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.knowledge-progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.knowledge-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.knowledge-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
}

/* 侧边栏样式 */
.sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.insight-item:hover {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.weak-point-item, .review-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.weak-point-item:hover, .review-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.point-info {
    flex: 1;
}

.point-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.point-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

/* 颜色工具类 */
.bg-excellent { background: linear-gradient(135deg, #28a745, #20c997); }
.bg-good { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.bg-average { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.bg-poor { background: linear-gradient(135deg, #dc3545, #e83e8c); }

.text-excellent { color: #28a745; }
.text-good { color: #17a2b8; }
.text-average { color: #ffc107; }
.text-poor { color: #dc3545; }

.border-excellent { border-left-color: #28a745; }
.border-good { border-left-color: #17a2b8; }
.border-average { border-left-color: #ffc107; }
.border-poor { border-left-color: #dc3545; }

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .subject-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}